﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace XinGuanERP.Models.Po.business
{
    public class ProductStock : PrivateCommonEntity<string>, IEntityTypeBuilder<ProductStock>
    {
        public string? ProductId { get; set; }
        public long? Stock { get; set; }
        public string? Remark { get; set; }
        public void Configure(EntityTypeBuilder<ProductStock> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
            entityBuilder.ToTable("biz_product_stock");
            entityBuilder.HasKey(t => t.Id);
            entityBuilder.Property(t => t.Id).HasColumnName("id");
            entityBuilder.Property(t => t.ProductId).HasColumnName("product_id");
            entityBuilder.Property(t => t.Stock).HasColumnName("stock");
            entityBuilder.Property(t => t.Remark).HasColumnName("remark");
            entityBuilder.Property(t => t.CreateTime).HasColumnName("CREATETIME");
            entityBuilder.Property(t => t.UpdateTime).HasColumnName("UPDATETIME");
            entityBuilder.Property(t => t.CreateUserId).HasColumnName("CREATEUSERID");
            entityBuilder.Property(t => t.CreateUserName).HasColumnName("CREATEUSERNAME");
            entityBuilder.Property(t => t.UpdateUserId).HasColumnName("UPDATEUSERID");
            entityBuilder.Property(t => t.UpdateUserName).HasColumnName("UPDATEUSERNAME");
        }
    }
}
